import { connect } from 'react-redux';
import { goBack } from 'react-router-redux';
import reportGastriccancer from '../components/report-gastriccancer'
import { calcRiskOfGastricCancer } from '../actions/CalcRiskAction';

const mapStateToProps = (state, ownProps) => ({
  inputData: state.report.gastricCancer.inputData,
  risk: state.report.gastricCancer.risk,
  initialRisk: state.report.gastricCancer.initialRisk,
  advice: state.report.gastricCancer.initialAdvice,
});

const mapDispatchToProps = (dispatch) => ({
  onCalcRisk: (data) => dispatch(calcRiskOfGastricCancer(data)),
  onCancel: ()=>dispatch(goBack()),
});
export default connect(mapStateToProps, mapDispatchToProps)(reportGastriccancer)
